package com.fbee.smartcommunities.service;

import com.fbee.smartcommunities.entity.Category;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fbee.smartcommunities.entity.Permission;
import com.fbee.smartcommunities.utils.CustomizeException;
import io.minio.errors.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

/**
 * <p>
 * 商品分类 服务类
 * </p>
 *
 * @author 汪佳泉
 * @since 2024-08-18
 */
public interface CategoryService extends IService<Category> {

    List<Category> getlist();

    Boolean update(Long id,String name,Integer type,MultipartFile file) throws ServerException, InsufficientDataException, ErrorResponseException, IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;

    Boolean check(String filedName,String value,Long id);

    Boolean delete(Long id) throws CustomizeException;

    Boolean addCategory(String name, Long parentId, Integer level, Integer type, MultipartFile file) throws ServerException, InsufficientDataException, ErrorResponseException, IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;
}
